<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <link href="layer/theme/default/layer.css">
    <!--字体图标-->
    <link href="http://cdn.javaex.cn/javaex/pc/css/icomoon.css" rel="stylesheet" />
    <!--动画-->
    <link href="http://cdn.javaex.cn/javaex/pc/css/animate.css" rel="stylesheet" />
    <!--骨架样式-->
    <link href="http://cdn.javaex.cn/javaex/pc/css/common.css" rel="stylesheet" />
    <!--皮肤（缇娜）-->
    <link href="http://cdn.javaex.cn/javaex/pc/css/skin/tina.css" rel="stylesheet" />
    <!--jquery，不可修改版本-->
    <script src="http://cdn.javaex.cn/javaex/pc/lib/jquery-1.7.2.min.js"></script>
    <!--全局动态修改-->
    <script src="http://cdn.javaex.cn/javaex/pc/js/common.js"></script>
    <!--核心组件-->
    <script src="http://cdn.javaex.cn/javaex/pc/js/javaex.min.js"></script>
    <!--表单验证-->
    <script src="http://cdn.javaex.cn/javaex/pc/js/javaex-formVerify.js"></script>


    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<!--主体内容-->
<div class="list-content">
    <!--块元素-->
    <div class="block">
        <!--页面有多个表格时，可以用于标识表格-->
        <h2>订单详情</h2>



        <!--正文内容-->
        <div class="main">


            <table id="table" class="table color2">
                <thead>
                <tr>
                    <th>id</th>
                    <th>商品类型</th>
                    <th>占用体积</th>
                    <th>重量</th>
                    <th>收货人电话</th>
                    <th>状态</th>

                </tr>
                </thead>
                <tbody>

                <tr th:each="good:${session.goodlist}">
                    <td th:text="${good.gid}"></td>
                    <td th:text="${good.gtype}"></td>
                    <td th:text="${good.gbulk}"></td>
                    <td th:text="${good.gweight}"></td>
                    <td th:text="${session.oneorder.ophone}"></td>
                    <td th:if="${good.gzt==0}"><button class="button gray">审核中</button></td>
                    <td th:if="${good.gzt==2}"><button class="button red">违禁物</button></td>
                    <td th:if="${good.gzt==1}"><button class="button green">已审核</button></td>
                </tr>

                </tbody>
            </table>


        </div>
    </div>
</div>
<form>
<div class="unit clear">
    <div class="left"><p class="subtitle">通知</p></div>
    <div class="right">
        <p th:each="good:${session.goodlist}">
        <input type="hidden" th:value="${good.oid}" name="oid">
        </p>
        <textarea class="desc" id="tstext" placeholder="提示用户相关违禁信息"></textarea>
        <!--提示说明-->
        <p class="hint">提示用户相关违禁信息</p>
    </div>
</div>
    <label>当前状态：</label>
    <input type="radio" class="fill" name="osta" th:checked="${session.oneorder.ostatus==2}" value="2" />已支付
    <input type="radio" class="fill" name="osta" th:checked="${session.oneorder.ostatus==3}" value="3"/>已配送
    <input type="radio" class="fill" name="osta" th:checked="${session.oneorder.ostatus==4}" value="4"/>已完成
    <input type="radio" class="fill" name="osta" th:checked="${session.oneorder.ostatus==5}" value="5"/>已打回
    <button type="button" id="btn01" class="button green">发送</button>
</form>
<script src="layer/layer.js"></script>
<script>

    $("#btn01").click(function () {
        var udesc = $("#tstext").val();
        var oid = $("input[name='oid']").attr("value");
        var ostatus = $("input[name='osta']:checked").attr("value");
        $.ajax({
            type:"post",
            url:"updateDesc.do",
            data:{
                "odesc":udesc,
                "oid":oid,
                "ostatus":ostatus
            },
            success:function (result) {
                if (result.flag){
                    layer.msg("发送成功！",{time:2000,icon:6,shift:6});
                }
            }
        })


    })
</script>
</body>
</html>